/*
 * CommonConstants.java  0.4.0 / Oct 23, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.util;

import java.util.Iterator;
import java.util.NoSuchElementException;

/**
 * Common Constants.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public interface CommonConstants {

// String Constants. -----------------------------------------------------------

  /**
   * Empty string (the value is {@value}).
   */
  public static final String STRING_EMPTY = "";

  /**
   * Space string (the value is {@value}).
   */
  public static final String STRING_SPACE = " ";

  /**
   * Dot string (the value is {@value}).
   */
  public static final String STRING_DOT = ".";

  /**
   * Comma string (the value is {@value}).
   */
  public static final String STRING_COMMA = ",";

  /**
   * Slash string (the value is {@value}).
   */
  public static final String STRING_SLASH = "/";

  /**
   * Tab string (the value is {@value}).
   */
  public static final String STRING_TAB = "t";

  /**
   * Default line separator string (the value is {@value}).
   */
  public static final String STRING_DEFAULT_LINE_SEPARATOR = "n";

  /**
   * Null string (the value is {@value}).
   */
  public static final String STRING_NULL = "null";

  /**
   * True string (value is "true").
   */
  public static final String STRING_TRUE = Boolean.TRUE.toString();

  /**
   * False string (value is "false").
   */
  public static final String STRING_FALSE = Boolean.FALSE.toString();

  /**
   * Text string (the value is {@value}).
   */
  public static final String STRING_TEXT = "text";

  /**
   * Text/HTML string (the value is {@value}).
   */
  public static final String STRING_TEXT_HTML = "text/html";

// Array Constants. ------------------------------------------------------------

  /**
   * Empty array of objects (the value is Object[0]).
   */
  public static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];

  /**
   * Empty array of strings (the value is String[0]).
   */
  public static final String[] EMPTY_STRING_ARRAY = new String[0];

  /**
   * Empty array of ints (the value is int[0]).
   */
  public static final int[] EMPTY_INT_ARRAY = new int[0];

  /**
   * Empty array of bytes (the value is byte[0]).
   */
  public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];

  /**
   * Empty array of floats (the value is float[0]).
   */
  public static final float[] EMPTY_FLOAT_ARRAY = new float[0];

// Object Constants. -----------------------------------------------------------

  /**
   * Empty iterator.
   */
  public static final EmptyIterator EMPTY_ITERATOR = new EmptyIterator();

// Inner Classes. --------------------------------------------------------------

  /**
   * Empty Iterator.
   */
  static final class EmptyIterator implements Iterator {
    public boolean hasNext() {
      return false;
    }
    public Object next() {
      throw new NoSuchElementException("No more elements");
    }
    public void remove() {
      throw new UnsupportedOperationException();
    }
  }

}
